package com.chat.controller;

import com.chat.service.sym.PollingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class PollingController {
    private final PollingService pollingService;

    @Autowired
    public PollingController(PollingService pollingService) {
        this.pollingService = pollingService;
    }

    @RequestMapping(value = "/user/polling.do",method = RequestMethod.GET)
    @ResponseBody
    public Map<String,String> polling(String email){
        return pollingService.polling(email);
    }
}